#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>

#define MAXLINES 1024
#define MAXCHARS 256

int main(int argc, char *argv[])
{
    char leftS[MAXLINES * MAXCHARS], *left[MAXLINES];
    char rightS[MAXLINES * MAXCHARS], *right[MAXLINES];
    FILE *fp;
    int i;
    int j;

    for (i = 0; i < MAXLINES; i++) {
	left[i] = leftS + i * MAXCHARS;
	strcpy(left[i], "");
	right[i] = rightS + i * MAXCHARS;
	strcpy(left[i], "");
    }

    assert((fp = fopen("NEW_PROFILE.prf", "r")) != NULL);
    for (i = 0; i < MAXLINES && fgets(left[i], MAXCHARS, fp) != NULL; ++i) {
    }
    assert(fclose(fp) == 0);

    assert((fp = fopen("DEFAULT_PROFILE.prf", "r")) != NULL);
    for (i = 0; i < MAXLINES && fgets(right[i], MAXCHARS, fp) != NULL; ++i) {
    }
    assert(fclose(fp) == 0);

    assert((fp = fopen("DIFF_PROFILE.prf", "w")) != NULL);
    for (i = 0; i < MAXLINES && strlen(right[i]) > 0; ++i) {
	for (j = 0;
	     i < MAXLINES && strcmp(left[j], right[i]) != 0
	     && strlen(left[j]) > 0; ++j) {
	}
	if (strcmp(left[j], right[i]) != 0) {
	    fputs(right[i], fp);
	}
    }
    assert(fclose(fp) == 0);

    exit(0);
    return 0;
}

/* vim: set ts=8 sw=4 ai: */
